﻿namespace NTLib.Core.Manipulators
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Threading;

    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class UnsafeSealedCollection<T> : SealedCollection<T, NoLocker>
    {
        #region Ctor

        /// <summary>
        /// Initializes a new instance of the <see cref="UnsafeSealedCollection{T}"/> class.
        /// </summary>
        public UnsafeSealedCollection()
        {

        }

        /// <summary>
        /// Initializes a new instance of the <see cref="SealedCollection{T, TLocker}"/> class.
        /// </summary>
        public UnsafeSealedCollection(IEnumerable<T> collection)
            : base(collection)
        {
        }

        #endregion
    }

    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class RWSealedCollection<T> : SealedCollection<T, ReaderWriterLocker>
    {
        #region Ctor

        /// <summary>
        /// Initializes a new instance of the <see cref="UnsafeSealedCollection{T}"/> class.
        /// </summary>
        public RWSealedCollection()
        {

        }

        /// <summary>
        /// Initializes a new instance of the <see cref="UnsafeSealedCollection{T}"/> class.
        /// </summary>
        public RWSealedCollection(ReaderWriterLocker Locker)
            : base(Locker)
        {

        }

        /// <summary>
        /// Initializes a new instance of the <see cref="SealedCollection{T, TLocker}"/> class.
        /// </summary>
        public RWSealedCollection(IEnumerable<T> collection)
            : base(collection)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="SealedCollection{T, TLocker}"/> class.
        /// </summary>
        public RWSealedCollection(IEnumerable<T> collection, ReaderWriterLocker Locker)
            : base(collection, Locker)
        {
        }

        #endregion
    }

    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class SemaphoreSealedCollection<T> : SealedCollection<T, SemaphoreLocker>
    {
        #region Ctor

        /// <summary>
        /// Initializes a new instance of the <see cref="UnsafeSealedCollection{T}"/> class.
        /// </summary>
        public SemaphoreSealedCollection()
        {

        }

        /// <summary>
        /// Initializes a new instance of the <see cref="UnsafeSealedCollection{T}"/> class.
        /// </summary>
        public SemaphoreSealedCollection(SemaphoreLocker Locker)
            : base(Locker)
        {

        }

        /// <summary>
        /// Initializes a new instance of the <see cref="SealedCollection{T, TLocker}"/> class.
        /// </summary>
        public SemaphoreSealedCollection(IEnumerable<T> collection)
            : base(collection)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="SealedCollection{T, TLocker}"/> class.
        /// </summary>
        public SemaphoreSealedCollection(IEnumerable<T> collection, SemaphoreLocker Locker)
            : base(collection, Locker)
        {
        }

        #endregion
    }
}